#include <iostream>
#include <vector> 
using namespace std;
int main()
{
    string p;
    cin >> p;
    vector <char> s;
    int a = 0;
    for (int i = 0;i<p.size(); i++) {
        if ( p[i] == '{' or p[i] == '(' or p[i] == '[' or p[i] == '<') {
            s.push_back(p[i]);
            cout << s[s.size()-1];
        }
        if ( p[i] == '}' or p[i] == ')' or p[i] == ']' or p[i] == '>') {
            cout << p[i];
            if (s.size() == 0) {
                cout << "close";
                a = 1;
                break;
            }
            if ((p[i]== ')' and p[p.size()-1]=='(') or
                (p[i]== ']' and p[p.size()-1]=='[') or
                (p[i]== '>' and p[p.size()-1]=='<') or
                (p[i]== '}' and p[p.size()-1]=='{')) {
                    p.pop_back();
                } else {
                    cout << "ne ta";
                    a = 1;
                    break;
                }
        }
    }
    if (a ==  0 and p.size() == 0) {
        cout << "true";
    }
    if (a ==  0 and p.size() > 0) {
        cout << "open";
    }
}


